package com.erp.quertz.emailQuertz;

import com.erp.erp_servers.Email.EmailService;
import com.erp.erp_servers.Email.Impl.EmailServiceImpl;

public class send {
    private volatile static send s = null;
    // 私有化构造方法
    private send() {

    }
    public synchronized void send(EmailService email){
        try {
            email.sendEmailTiming();
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println("定时发送中断");
        }
    }
    public static send getsend() {
        if (s == null) {
            synchronized (send.class) {
                if (s== null) {
                    s = new send();
                }
            }
        }
        return s;
    }
}
